{extend name="./template/default/pub/base.html" /}
{block name="seo"}
<title>{$cate_selector}漫画-{$site_name}</title>
{/block}
{block name="content"}
{include file="./template/default/pub/top2.html" /}
<div class="manga-list-bar" id="end">
    <a class="manga-list-bar-item {$end_selector=='全部'?'active':''}" onclick="active(this)" data-val="-1">全部</a>
    <a class="manga-list-bar-item {$end_selector=='0'?'active':''}" onclick="active(this)" data-val="0">连载中</a>
    <a class="manga-list-bar-item {$end_selector=='1'?'active':''}" onclick="active(this)" data-val="1">已完结</a>
    <a class="manga-list-bar-right " id="manga-list-bar-right">地区</a>
    <div class="manga-list-bar-right-down" id="manga-list-bar-right-down" style="display:none;">
        <a class="manga-list-bar-right-down-item {$area_selector=='全部'?'active':''}" onclick="active(this)" data-val="-1">全部</a>
        {volist name="areas" id="vo"}
        <a class="manga-list-bar-right-down-item {$area_selector==$vo.id?'active':''}" onclick="active(this)" data-val="{$vo.id}">{$vo.area_name}</a>
        {/volist}
    </div>
</div>
<script>
    function active(item) {
        $(item).siblings().removeClass('active');
        $(item).addClass('active');
        var end = $('#end a.active').attr('data-val');
        var area = $('#manga-list-bar-right-down a.active').attr('data-val');
        location.href = '/{$booklist_act}/?tag={$cate_selector}'+'&area='+area+'&end='+end;
    }
</script>
<div class="manga-list" style="border:none;background-color:#f8f8f8;padding-top: 87px;">
    <ul class="manga-list-2">
        {volist name="books" id="vo"}
        <li>
            <div class="manga-list-2-cover">
                <a href="/{$book_ctrl}/{$vo.param}">
                    <img class="manga-list-2-cover-img lazy" data-original="{$vo.cover_url}" src="https://s1.ax1x.com/2018/12/13/FN8WLQ.jpg">
                </a>
            </div>
            <p class="manga-list-2-title">
                <a href="/{$book_ctrl}/{$vo.param}">{$vo.book_name}</a>
            </p>
            <p class="manga-list-2-tip">
                {$vo.summary}
            </p>
        </li>
        {/volist}
    </ul>
    <div class="pagination">
        {if $page.last_page > 1}
            {if $page.current_page == 1}
            <a class="paginate-disabled-btn" href="#"> < </a>
            {else/}
            <a class="paginate-btn" href="/{$booklist_act}/?page={$page.current_page-1}{$param}" title="上一页"> < </a>
            {/if}
            {if $page.current_page == $page.last_page}
            <a class="paginate-disabled-btn" href="#"> > </a>
            {else/}
            <a class="paginate-btn" href="/{$booklist_act}/?page={$page.current_page+1}{$param}" title="下一页"> > </a>
            {/if}
        {/if}
    </div>
</div>

<script>
    $(function () {
        $("#manga-list-bar-right").click(function () {
            if ($("#manga-list-bar-right-down").is(":hidden")) {
                $("#manga-list-bar-right-down").show();
            }
            else {
                $("#manga-list-bar-right-down").hide();
            }
        });
    });
</script>
{include file="./template/default/pub/return_top.html"}
{/block}